import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import typescript from 'rollup-plugin-typescript2'
const overtsConfig = {
    compilerOptions:{
        declaration:false
    }
}
export default [
    {
        input: './src/index.ts',
        plugins: [
            resolve(),
            commonjs(),
            typescript({tsconfigOverride:overtsConfig})
        ],
        // platform-library-utils
        output: [
            {
                file: './dist/es/platform-library-utils.esm.js',
                format: 'es',
                name: 'CommonUtils'
            },
            {
                file: './dist/lib/platform-library-utils.cjs.js',
                format: 'cjs',
                name: 'CommonUtils'
            },
            {
                file: './dist/dist/platform-library-utils.min.js',
                format: 'iife',
                name: 'CommonUtils',
                sourcemap: true
            },
        ],
    },
    {
        input: './src/index.ts',
        plugins: [
            resolve(),
            commonjs(),
            typescript({
                useTsconfigDeclarationDir:true,
                tsconfigOverride:{
                    compilerOptions:{
                        declarationDir:"./dist/declare"
                    }
                }
            }),
        ],
        output: [
            {
                file: './dist/index.js',
                format: 'umd',
                name: 'CommonUtils'
            }
        ],
    }
]